import { Column, Entity, PrimaryGeneratedColumn, Unique } from 'typeorm';

/**
 * 团队表
 */
@Entity('team')
export class TeamEntity {
  @PrimaryGeneratedColumn('increment', {
    type: 'int',
  })
  id?: number;

  @Column('varchar', {
    nullable: false,
    length: 50,
    comment: '团队名称',
  })
  name?: string;

  @Column('varchar', {
    nullable: true,
    length: 100,
    comment: '团队头像',
  })
  avatar?: string;

  @Column('varchar', {
    nullable: true,
    length: 1000,
    comment: '团队介绍',
  })
  desc?: string;

  @Column('int', {
    width: 11,
    nullable: true,
  })
  userId: number;

  @Column('bigint', {
    width: 13,
    comment: '添加时间',
  })
  create_time?: number;

  @Column('bigint', {
    width: 13,
    comment: '修改时间',
  })
  update_time?: number;
}
